package com.xf.spring.annotation.service;

import com.xf.spring.annotation.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * Created by xiefei on 2015/12/29.
 */
@Service
public class UserService {
    @Autowired
    @Qualifier("userJDBCRepository")
    private UserRepository userRepository;

//    public void setUserRepository( @Qualifier("userJDBCRepository") UserRepository userRepository) {
//        this.userRepository = userRepository;
//    }

    public void add(){
        System.out.println("UserService add...");
        userRepository.save();
    }
}
